Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: switch to brave node if the default port is offline #968

Merged
merged 1 commit into from
Jan 20, 2021

Conversation

lidel
Copy link
Member

@lidel lidel commented Jan 20, 2021

This PR improves onboarding experience on Brave.

TLDR

  • Before this PR, user had to manually swith node type to "Provided by Brave"
  • With this PR, when IPFS Companion is installed for the first time in Brave
    • AND there is no IPFS Daemon on port 8080 (defult go-ipfs and IPFS Desktop)
      • IF Brave node is already running, Companion will use it
      • IF Brave node is not running, Companion will trigger onboarding flow

Details

  • This is a small change that will default to endpoint provided by Brave when Brave runtime is detected and if the current endpoint (by default 127.0.0.1:8080) is offline.
    • This means user won't need to go to preferences and switch the backend to "Provided by Brave"
    • new users will have that set for them automatically
    • (more or less what @Gozala suggested during this week's GUI/Web call).
  • It also fixes a bug where "Welcome" page did not update when enabling Brave node required user interaction – we now reload internal pages when a new backend finished its init chores (fixes bug @autonome reported, but was hard to track down).
  • Sadly there is no way to test this other than manual. Looks ok on my end, will publish this as 1% rollout (Sunsetting the beta channel #964) and we can refine it then.

This is a small change that will default to endpoint provided by Brave
if the current endpoint (by default 127.0.0.1:8080) is offline.

This means user won't need to go to preferences and switch the backend
to "Provided by Brave", new users will have that set for them
automatically.

It also fixes a bug where "Welcome" page did not update when enabling
Brave node required user interaction – we now reload internal pages
when a new backend finished its init chores.
@lidel lidel merged commit 80dea75 into master Jan 20, 2021
@lidel lidel deleted the feat/default-to-brave-node branch January 20, 2021 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant